package se.jagvetintedu;

import java.util.ArrayList;

public class Problem3 {

//	The prime factors of 13195 are 5, 7, 13 and 29.
//	What is the largest prime factor of the number 600851475143 ?
			

	public static void main(String args[])
	{
		System.out.println("Project Euler, problem 3");
		
		ArrayList<Integer> factor = MyFunctions.findPrimeFactors(600851475143L);
		
		Integer max = 0;
		for (Integer i : factor) {
			if (i > max) {
				max = i;
			}
		}
		
		System.out.println("The largest prime factor is " + max);
	}
}
